   pawno.ru.
       , .
      . 
       sa-mp  new.pwn.    ,        mxINI.

     :

 .
-  
-   .
-  
-  
-  
-  .

    .      ,   ..

 ,    ,    ,    .
 .

 .  ,   :

    sa-mp  . . [URL="http://team.sa-mp.com/files/samp03dsvr_R2_win32.zip"][/URL]
       .
 server.cfg,   rcon_password changename,   ,   filterscripts,   FS  .  gamemode,  new.
    mxINI. [URL="http://rghost.ru/35987201"][/URL]
  pawno,     ,  include,    mxINI,   .
   gamemodes,        (   ).
   pawno,    pawno.exe.
,  ,    new.
  ,    ,   .
 F5,     ,    .   gamemodes,     ,     new .
  ,     ,    samp-server.exe .
  ,    ,   .

 .    :

  .      , 
[PAWN]#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif[/PAWN]

    . .
 

[PAWN]public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}[/PAWN]

  ,  

[PAWN]main()
{
	print("\n----------------------------------");
	print("   ,    pawno.ru");
	print("----------------------------------\n");
}[/PAWN]

   ,     .

[PAWN]#include <a_samp>[/PAWN]

  ,         .     :

[PAWN]#include <mxINI>[/PAWN]

 F5,   ,     ,     .

 

[PAWN]SetGameModeText("Blank Script");[/PAWN]

 ,   ,     .    .

[PAWN]SetGameModeText("Pawno.ru Mode");[/PAWN]

 , ..     .     .


 .  .

   ,     .    .
     ,  ,    .

[PAWN]enum pInfo
{
	pPass[64],//   
}
new Player[MAX_PLAYERS][pInfo];[/PAWN]

    ,  ,     .

    ,   ,  :

[PAWN]stock SavePlayer(playerid)
{
    new string[64];//     
	new playername[MAX_PLAYER_NAME];//     
	GetPlayerName(playerid, playername, sizeof(playername));//   
	format(string, sizeof(string), "players/%s.ini", playername);//   ,    
	iniFile = ini_openFile(string);//       .
	ini_setString(iniFile,"Pass",Player[playerid][pPass]);//     
	ini_closeFile(iniFile);//  
}[/PAWN]

 F5,   .   ,     .
       ,   scriptfiles,      players.
 .

 .  ,  .

  ,  ,        ,       ,  :

[PAWN]new PAccount[MAX_PLAYERS];//  ,  [/PAWN]

   OnPlayerConnect.    :

[PAWN]new playername[MAX_PLAYER_NAME];//    
    new string[128];//      
	GetPlayerName(playerid,playername,sizeof(playername));//   
    format(string,sizeof(string),"players/%s.ini", playername);//     
    if(fexist(string))//   ,       .
 	{
		PAccount[playerid] = 1;//  
	}
	else//     ,    .
	{
	    PAccount[playerid] = 0;//  
	}[/PAWN]

  , OnPlayerRequestClass,      ,  ,   .

[PAWN]if(PAccount[playerid] == 1)//   
	{
	    ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT," ","\n    \n    ","","");//     .      .
	}
	else//   
	{
	    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT," ","\n   .\n    ","","");//   .      .
	}[/PAWN]

  ,      .          .
   .   , .

[PAWN]forward OnPlayerRegister(playerid, password[]);
public OnPlayerRegister(playerid, password[])//  
{
	if(IsPlayerConnected(playerid))
	{
	    new string[64];//     
		new playername[MAX_PLAYER_NAME];//     
		GetPlayerName(playerid, playername, sizeof(playername));//   
		format(string,sizeof(string), "players/%s.ini", playername);//   ,    
		new iniFile = ini_createFile(string);//        players
		if(iniFile < 0)//   
		{
			iniFile = ini_openFile(string);// 
		}
		if(iniFile >= 0)//   
		{
			strmid(Player[playerid][pPass],password,0,strlen(password),255);//   pPass,  password[]
			ini_setString(iniFile,"Pass",Player[playerid][pPass]);//     
			ini_closeFile(iniFile);//  
			ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT," ","\n    \n    ","","");//     .
		}
	}
	return 1;
}[/PAWN]

   , ,   .   , .
